//
//  ViewController.swift
//  YKZoomHeaderView
//
//  Created by YK on 16/2/16.
//  Copyright © 2016年 YK. All rights reserved.
//

import UIKit

class ViewController: UIViewController,UITableViewDataSource,UITableViewDelegate {

    @IBOutlet weak var tableView: UITableView!
    var imageView:UIImageView!
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        imageView = UIImageView(frame: CGRectMake(0, 0, self.view.frame.size.width, 200));
        imageView.image = UIImage(named: "1.jpg")
        
        self.tableView.addZoomHeaderView(imageView)
    }
    
    

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 10;
    }
    
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        var cell = tableView.dequeueReusableCellWithIdentifier("cell")
        if(cell == nil){
            cell = UITableViewCell(style: .Default, reuseIdentifier: "cell")
        }
        return cell!
    }
    
    func scrollViewDidScroll(scrollView: UIScrollView) {
          }

}

